mixin language-select(options, selected)
  .my-fancy-select
    select&attributes(attributes)
      for option in options
        option.options(value=option.id, title=option.reason, selected=selected === option.id, disabled=option.disabled)=option.name

.form
  .form-group.select-group.code-format-form.half-width
    span.help-block(data-i18n="choose_hero.code_format")
    +language-select(codeFormats, codeFormat)#option-code-format(name="code-format")
  .form-group.select-group.half-width.code-language-form
    span.help-block(data-i18n="choose_hero.programming_language")
    +language-select(codeLanguages, codeLanguage)#option-code-language(name="code-language")
